import Vue from 'vue'
import Router from 'vue-router'
import Detail from '@/components/Detail'
import Movie from '@/components/Movie'
import TV from '@/components/TV'
import Cartoon from '@/components/Cartoon'
import SearchPage from '@/components/searchPage'
import SearchResult from '@/components/searchResult'
import About from '@/components/about'

Vue.use(Router)

//  mode: 'history',
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Movie',
      component: Movie
    },
    {
      path: '/detail/:id',
      name: 'Detail',
      component: Detail
    },
    {
      path: '/movie',
      name: 'Movie',
      component: Movie
    },
    {
      path: '/tv',
      name: 'TV',
      component: TV
    },
    {
      path: '/cartoon',
      name: 'Cartoon',
      component: Cartoon
    },
    {
      path: '/about',
      name: 'About',
      component: About
    },
    {
      path: '/searchPage',
      name: 'SearchPage',
      component: SearchPage
    },
    {
      path: '/searchResult',
      name: 'SearchResult',
      component: SearchResult
    }
  ]
})
